import request from '@/utils/request'

// 查询合同申请列表
export function listPurchaseContact(query) {
  return request({
    url: '/oa/purchaseContact/list',
    method: 'get',
    params: query
  })
}

// 查询合同申请详细
export function getPurchaseContact(id) {
  return request({
    url: '/oa/purchaseContact/' + id,
    method: 'get'
  })
}

// 新增合同申请
export function addPurchaseContact(data) {
  return request({
    url: '/oa/purchaseContact',
    method: 'post',
    data: data
  })
}

// 修改合同申请
export function updatePurchaseContact(data) {
  return request({
    url: '/oa/purchaseContact',
    method: 'put',
    data: data
  })
}

// 删除合同申请
export function delPurchaseContact(id) {
  return request({
    url: '/oa/purchaseContact/' + id,
    method: 'delete'
  })
}
// 获取没有合同申请的项目信息
export function getProjectList() {
  return request({
    url: '/oa/purchaseContact/getProjectList',
    method: 'get'
  })
}
// 通过项目名称查询合同申请
export function queryPurchaseContactByProjectName(data) {
  return request({
    url: '/oa/purchaseContact/queryByProjectName',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data,
  })
}
